<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Rails '09 Practice</title>
		<%= stylesheet_link_tag "style" %>
	</head>
	<body>
		<% if flash[:success] %>
			<div class="success"><%= flash[:success] %></div>
		<% end %>
		<% if flash[:error] %>
			<div class="error"><%= flash[:error] %></div>
		<% end %>
		<h1>Ilmo 2.0</h1>
		<% if session[:autentikoitu] %>
			<%= link_to "Logout", session_url, :method=>:delete %>
			<% if user_is_admin(session[:autentikoitu]) %>
				 - <%= link_to "Admin CP", admin_url %>
			<% end %>
		<% end %>
		
		<%= yield %>
		
		<hr/>
		<%= luontiaika %>
	</body>
</html>
